%p#notice= notice
- content_for(:panel_heading) do
  = @panel_heading
%form{:method => 'POST', :action => "/project_webs/#{@project.id}/set_settings" }
  = hidden_field_tag :authenticity_token, form_authenticity_token
  %input{:type => 'text', :name => 'id',  :value => @project.id, :hidden => true }

  %table{:width => '900px'}
    %tr
      %td{:width => '500px'}
        %label{:for => 'subdomain'} 
        subdomain:
        %input{:type => 'text', :name => 'subdomain',  :value => @rds[:subdomain] || ""}
      %td{:width => '500px'}
        %label{:for => 'im_user_key'} 
        im_user_key:
        %input{:type => 'text', :name => 'im_user_key',  :value => @rds[:im_user_key] || ""}
    %tr
      %td{:width => '500px'}
        %label{:for => 'im_web_plugin_id'} 
        im_web_plugin_id:
        %input{:type => 'text', :name => 'im_web_plugin_id',  :value => @rds[:im_web_plugin_id] || ""}
      %td{:width => '500px'}
        %label{:for => 'web_token'} 
        web_token:
        %input{:type => 'text', :name => 'web_token',  :value => @rds[:web_token] || ""}
    %tr
      %td
        %input{:type => 'submit', :value => '保存'}
      %td
        %label
        %a{ :href => "http://www.udesk.cn/doc/thirdparty/webim/#_1", :title => "文档", target: '_blank' }
          文档
  %p
    %textarea{:cols => '80', :rows => "10", name: "extra"}
      = @extra

%p
%hr

%p
%hr
%h2 插件嵌入代码
%pre
  = "#{@rds[:web_plugin_code]}"

%form{:method => 'POST', :action => "/project_webs/#{@project.id}/refresh_code" }
  = hidden_field_tag :authenticity_token, form_authenticity_token
  %input{:type => 'text', :name => 'id',  :value => @project.id, :hidden => true }
  %input{:type => 'submit', :value => '重新请求'}
%p
